<?php
namespace app\index\controller;
// +----------------------------------------------------------------------
// | ThinkAdmin
// +----------------------------------------------------------------------
// | 版权所有 2014~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目：https://github.com/zoujingli/ThinkAdmin
// +----------------------------------------------------------------------


use think\Controller;
use think\Queue;
use think\Db;
class Index extends Controller
{
    public function queueTest(){
        $data = Db::name("datatablelog")->where(['status' => 0])->find();
        $json = json_encode($data);
        Queue::push('Job1', $json, $queue = null);
//        foreach ($data as $key=>$val){
//            $json = json_encode($val);
//            Queue::push('Job1', $json, $queue = null);
//        }
    }
}


